{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Unpacking a List/Tuple with *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sum: 16\n"
     ]
    }
   ],
   "source": [
    "def addition(a, b, c):\n",
    "    return a + b + c\n",
    "\n",
    "num = (1, 5, 10)  \n",
    "result = addition(*num) \n",
    "print(\"Sum:\", result)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Unpacking a Dictionary with **"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Name: geeks for geeks, Age: 30, Country: India\n"
     ]
    }
   ],
   "source": [
    "def info(name, age, country):\n",
    "    print(f\"Name: {name}, Age: {age}, Country: {country}\")\n",
    "\n",
    "data = {\"name\": \"geeks for geeks\", \"age\": 30, \"country\": \"India\"}\n",
    "info(**data)  \n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "jupter-env-10",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
